package ru.isys.view;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

import ru.isys.xml.XmlItem;

public class ModelItem extends JPanel{
	
    private String item;
	private JCheckBox check;
	private JLabel label;
	private int level;
	
	private ModelItem() {
		
	}
	
	public ModelItem(String item, int level)
	{
	    this.item=item;
		this.level = level;
		setSize(450, 25);
		setBackground(Color.LIGHT_GRAY);
		setBorder(BorderFactory.createLineBorder(Color.BLACK));
		
		label = new JLabel(this.item);
		check = new JCheckBox();
		check.setSelected(true);
		add(check);
		add(label);
	}
	
	public int getLevel()
	{
		return level;
	}
	
	boolean isSelected()
	{
		return check.isSelected();
	}

    public String getItem()
    {
        return item;
    }

    public void setItem(String item)
    {
        this.item = item;
    }

}
